Skip to content

gh-71199: Always build posixmodule as _os - #161915

Open
cmaloney wants to merge 3 commits into
python:mainfrom
cmaloney:gh-71199-build-as-os
Open

cmaloney wants to merge 3 commits into
python:mainfrom
cmaloney:gh-71199-build-as-os

Conversation

@cmaloney

@cmaloney cmaloney commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The module was compiled as posix or nt depending on the platform. Build it as _os everywhere with a single PyInit__os. Keep the historical names available for compatibility backed by the same init function so sys.builtin_module_names, find_spec() and loading it by hand (as LazyLoader does) keep working.

Freeze skips posix and nt when writing its config.c, since the inittab templates already map them to PyInit__os.

The module was compiled as posix or nt depending on the platform. Build
it as `_os` everywhere with a single `PyInit__os`. Keep the historical
names available for compatibility backed by the same init function so
sys.builtin_module_names, find_spec() and loading it by hand (as
LazyLoader does).

Freeze skips posix and nt when writing its config.c, since the
inittab templates already map them to PyInit__os.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cmaloney cmaloney closed this Nov 12, 2026
@cmaloney cmaloney reopened this Nov 12, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35895088 | 📁 Comparing 2922cff against main (b968417)

  🔍 Preview build  

2 files changed
± library/posix.html
± whatsnew/changelog.html

@cmaloney cmaloney added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 14, 2026
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @cmaloney for commit 2922cff 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F161915%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants